The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
Database queries are processed as a flow of database operations. Such operations, like group-by, join, and filter, run faster in local memory that is close to the processing unit than non-local storage. Local memory can be any tier of memory where data is processed and can include, for example, static random-access memory (SRAM), dedicated scratchpad memory, or cache memory. Non-local memory can be any tier of memory where processed data is moved temporarily or permanently and can include dynamic random-access memory (DRAM) or disk memory.
Local memory is usually small and it is not always feasible to fit the input and output buffers of all operations into local memory. Thus, there is a need for an optimized strategy for processing database operations in local memory.
While each of the drawing figures depicts a particular embodiment for purposes of depicting a clear example, other embodiments may omit, add to, reorder, and/or modify any of the elements shown in the drawing figures. For purposes of depicting clear examples, one or more figures may be described with reference to one or more other figures, but using the particular arrangement depicted in the one or more other figures is not required in other embodiments.